from django.shortcuts import render


def slice_view(request):
    context = {
        'value': '北京欢迎您来这里一起'
    }
    return render(request, 'slice.html', context=context)


def stringtags_view(request):
    context = {
        'value': '<a href="https://www.baodi.com">百度</a>'
    }
    return render(request, 'stringtags.html', context=context)


def truncatechars_view(request):
    context = {
        'value': '北京欢迎您~'
    }
    return render(request, 'truncatechars.html', context=context)


def truncatechars_html_view(request):
    context = {
        'value': '<p>北京欢迎您~</p>'
    }
    return render(request, 'truncatechars_html.html', context=context)
